RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
## RFoptions(seed=NA) to make them all random again
## simple calculation
RFcalc(3 + R.sin(pi/4))
## calculation performed on a field
RFfctn(R.p(1) + R.p(2), 1:3, 1:3)
RFfctn(10 + R.p(2), 1:3, 1:3)
## calculate the distances between two vectors
print(RFfctn(R.p(new="iso"), 1:10, 1:10))
## simulation of a non-stationary field where
## anisotropy by a transform the coordinates (x_1^2, x_2^1.5)
x <- seq(0.1, 6, if (interactive()) 0.12 else 2)
Aniso <- R.bind(R.p(1)^2, R.p(2)^1.5)
z <- RFsimulate(RMexp(Aniso=Aniso), x, x)
FinalizeExample()
Run the code above in your browser using DataLab